#pragma once
#include <QStyledItemDelegate>
#include "TreeItem.h"
#include "TreeItemDataDef.h"

class CustomListItemDelegate : public QStyledItemDelegate
{
	Q_OBJECT
public:
	explicit CustomListItemDelegate(QObject *p = nullptr);
	void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
	bool editorEvent(QEvent * event, QAbstractItemModel * model, const QStyleOptionViewItem & option, const QModelIndex & index);

public slots:
	void SlotHoverIndexChange(const QModelIndex &_index);

private:
	QPixmap m_dirImage;
	QPixmap m_fileImage;
	QPixmap m_driveImage;
	int m_selectionRow;
	int m_hoverRow;
};